def func():
    k = int(input())
    b = input().split("-")
    c = ''
    for i in range(1, len(b)):
        c = c + b[i]
    #print(c)
    d = len(c) // k
    #print(d)
    e = []
    for i in range(1, d + 1):
        e.append(c[(i - 1) * k:i * k])
    e.append(c[d * k:])
    #print(e)
    da = 0
    xiao = 0
    s = ''
    for i in e:
        k = len(i)
        for j in range(k):
            # print(i[j])
            if 'a' <= i[j] <= 'z':
                xiao = xiao + 1
            if 'A' <= i[j] <= 'Z':
                da = da + 1
        if da > xiao:
            s = s + '-' + i.upper()
        if da < xiao:
            s = s + '-' + i.lower()
        if da == xiao:
            s = s + '-' + i
        da = 0
        xiao = 0
    s = b[0]+s
    print(s)


if __name__ == '__main__':
    func()
    """
    输入:12abc-abcABC-4aB@
    k = 3
    abc-ABC-4aB-@
    
    
    12abc-abc-ABC-4aB-@
    """
